@charset "utf-8";

$color1: #000; //黑色
$color2: #fff; //白色
$color3: #3c7475; //绿色header
$color4: #00c2c2; //绿色input border
$color5: #999; //灰色
$color6: #333;
$color7: #f2fcfc;
$color8: #009688; //按钮默认颜色
$color9: #d9d9d9; //border灰色
$color10: #f39b12; //橙色
$color11: #666;

@function px2rem($px) {
  @return $px / 100px * 1rem;
}

@mixin center-block {
  margin-left: auto;
  margin-right: auto;
}

@mixin clearBoth {
  &:after {
    height: 0;
    display: block;
    content: ' ';
    clear: both;
    overflow: hidden;
  }
}

@mixin box-shadow($shadow...) {
  -webkit-box-shadow: $shadow;
  box-shadow: $shadow;
}

@mixin text-shadow($shadow...) {
  text-shadow: $shadow;
}

@function calculateRem($size) {
  $remSize: $size / 100px;
  @return $remSize * 1rem;
}

@mixin font-size($size) {
  font-size: calculateRem($size);
}

@mixin rounded($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  border-radius: $radius;
}

@mixin opacity($opacity) {
  opacity: $opacity;
  $opacity-ie: $opacity * 100;
  filter: alpha(opacity=$opacity-ie); //IE8
}

@mixin text-ellipsis() {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@mixin box-flex() {
  display: -webkit-flex; /* Safari */
  display: flex;
}

@mixin flex($value) {
  -webkit-box-flex: $value;
  -ms-flex: $value;
  flex: $value;
}

@mixin box-sizing($sizing) {
  -webkit-box-sizing: $sizing;
  -moz-box-sizing: $sizing;
  box-sizing: $sizing;
}

@mixin transform($transform) {
  -webkit-transform: $transform;
  -moz-transform: $transform;
  -ms-transform: $transform;
  -o-transform: $transform;
  transform: $transform;
}

@mixin ellipsis($clamp) {
  overflow: hidden;
  text-overflow: ellipsis;
  @if $clamp==1 {
    white-space: nowrap;
  } @else {
    display: -webkit-box;
    -webkit-line-clamp: $clamp;
    -webkit-box-orient: vertical;
  }
}